Fusion Service Provider
Configure
config.http.configureClient('my_service_discovery', {
baseUri: 'https://foo.bar',
defaultScopes: ['321312bab2-3213123bb-321312aa2/.default'],
});
config.serviceDiscovery.clientKey = 'my_service_discovery'
config.serviceDiscovery.uri = 'api/services';
config.serviceDiscovery.selector = async (response: Response): Promise<Environment> => {
const services = await response.json() as Service[];
return services.reduce((acc, service) => Object.assign(acc, {[service.key]: service}), {});
}